package com.butterfly.hotkey.client.core;

/**
 * Key的value
 *
 * @author butterfly
 * @since 2025/2/9
 */
public class KeyValue {

    /**
     * 是否hot
     */
    private boolean isHot;

    /**
     * key value
     */
    private Object value;

    public KeyValue(boolean isHot, Object value) {
        this.isHot = isHot;
        this.value = value;
    }

    /**
     * 构建一个null
     *
     * @param isHot isHot
     * @return KeyValue
     */
    public static KeyValue nullValue(boolean isHot) {
        return new KeyValue(isHot, null);
    }

    /**
     * 构建一个hotkey
     *
     * @param value value
     * @return KeyValue
     */
    public static KeyValue hotKey(Object value) {
        return new KeyValue(true, value);
    }

    public boolean isHot() {
        return isHot;
    }

    public void setHot(boolean hot) {
        isHot = hot;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
}
